package com.hfmall.mapper;

import com.hfmall.entity.HfUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.repository.query.Param;

import java.math.BigDecimal;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liclo
 * @since 2021-08-12
 */
public interface HfUserMapper extends BaseMapper<HfUser> {
    HfUser getByName(String name);
    @Update("UPDATE hf_user SET status=#{status} WHERE id=#{id}")
    void updateByID(HfUser hfUser);

    HfUser getById(int userId);

    HfUser getByCode(String code);

    void updateMoney(@Param("user_id") Integer user_id,@Param("money") BigDecimal money);
}
